home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / ps40sdk / examples / export / outbound / common / outbound.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-14  |  2.4 KB  |  87 lines

  1. /*
  2.     File: Outbound.h
  3.  
  4.     Copyright (c) 1994-6, Adobe Systems Incorporated.
  5.     All rights reserved.
  6.  
  7.     Utilities for Outbound example export module.
  8. */
  9.  
  10. #ifndef __Outbound_H__
  11. #define __Outbound_H__
  12.  
  13. #include "PITypes.h"
  14. #include "PIGeneral.h"
  15. #include "PIExport.h"
  16. #include "PIUtilities.h"
  17. #include "WinFileUtils.h"
  18. #include "PIActions.h"
  19.  
  20. /*****************************************************************************/
  21.  
  22. #define kEditText        4
  23.  
  24. /*****************************************************************************/
  25. /* The region of the image being exported (an area and a range of planes).   */
  26.  
  27. typedef struct ExportRegion
  28.     {
  29.     Rect rect;
  30.     int16 loPlane;
  31.     int16 hiPlane;
  32.     }
  33. ExportRegion;
  34.  
  35. /*****************************************************************************/
  36.  
  37. OSErr FetchData (ExportRecord *stuff /* in/out */,
  38.                  ExportRegion *region /* in */,
  39.                  void **data /* out */,
  40.                  int32 *rowBytes /* out */);
  41.  
  42. /*****************************************************************************/
  43.  
  44. void MarkExportFinished (ExportRecord *stuff);
  45.  
  46. /*****************************************************************************/
  47.  
  48. extern Handle hDllInstance;
  49.  
  50. typedef struct Globals
  51.     {
  52.  
  53.     short result;
  54.     ExportRecord     *exportParamBlock;
  55.     Boolean            queryForParameters;
  56.     Boolean            sameNames;
  57.     
  58.     #if Macintosh
  59.     AliasHandle        aliasHandle;
  60.     #else
  61.     Handle            aliasHandle;
  62.     #endif
  63.     
  64.         
  65.     } Globals, *GPtr, **GHdl;
  66.     
  67. /*****************************************************************************/
  68.  
  69. #define gResult                 (globals->result) // ((*globals).result)
  70. #define gStuff                  (globals->exportParamBlock) // ((*globals).exportParamBlock)
  71. #define gQueryForParameters        (globals->queryForParameters) // ((*globals).queryForParameters)
  72. #define gSameNames                (globals->sameNames)
  73. #define gAliasHandle            (globals->aliasHandle)
  74.  
  75. /*****************************************************************************/
  76.  
  77. Boolean    ReadScriptParams (GPtr globals);
  78. OSErr    WriteScriptParams (GPtr globals);
  79. Boolean QueryForExportFile (GPtr globals);
  80. Boolean CreateExportFile (GPtr globals, FileHandle *fRefNum);
  81. Boolean WriteExportFile (GPtr globals, FileHandle fRefNum);
  82. Boolean CloseExportFile (GPtr globals, FileHandle fRefNum);
  83. void DestroyAliasHandle (GPtr globals);
  84. void DoAbout (GPtr globals);
  85.  
  86. /*****************************************************************************/
  87. #endif /* __Outbound_H__ */